package com.scriptback.dto.script;


import com.scriptback.entity.Scripts;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ScriptResponseDTO {

    private String script_id;
    private String project_id;
    private String script_name;
    private String script_description;
    private String script_code;

    public static ScriptResponseDTO fromEntity(Scripts script) {

        return new ScriptResponseDTO(
                script.getId(),
                script.getProjectId(),
                script.getName(),
                script.getDescription(),
                script.getCode()
        );

    }

}
